package lesson1_20.lesson17;

public class Person {
    private String name;

    private Integer age;
    private int sexValue;
    private String sexTitle;

    public Person(String name, Integer age, Sex sex) {
        this.name = name;
        this.age = age;

        this.sexValue = sex.getValue();
        this.sexTitle = sex.getTitle();
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }


    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", sexValue=" + sexValue +
                ", sexTitle='" + sexTitle + '\'' +
                '}';
    }
}
